<%--
  Created by IntelliJ IDEA.
  User: Teacher
  Date: 2025/3/28
  Time: 14:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>文件上传</title>
</head>
<body>
<h1>文件上传</h1>
<hr>
<!--
    想要实现文件上传,对于表单有两个要求
    1.表单提交方式必须是POST
    2.表单数据必须通过二进制流传递
-->
<form action="${pageContext.request.contextPath}/upload.file" method="post" enctype="multipart/form-data">
    用户名:<input type="text" name="username"><br>
    文件:<input type="file" name="file"><br>
    <input type="submit" value="提交">
    <span style="color: red;">${uploadMsg}</span>
</form>
</body>
</html>
